package org.sca.middle.cmpe.dto;

import java.io.Serializable;

/**
 * <p>Updated 3/6/2014: Fixed The serializable class ScaGroup does not declare a static final serialVersionUID field of type long</p>
 * @author rik
 * @author Kevin Carlen
 * @version 1.1
 */
public class ScaGroup implements Serializable, Comparable<ScaGroup>  {
    /**
	 * UID for {@link java.io.Serializable}
	 */
	private static final long serialVersionUID = -8487735065588640962L;
	
	/** The name of the group */
	private String groupName;
	
	/** The region the group is in */
    private String groupLocation;

    /**
     * @return the region the group is in
     */
    public String getGroupLocation() {
        return groupLocation;
    }

    /**
     * @param groupLocation the region the group is in
     */
    public void setGroupLocation(String groupLocation) {
        this.groupLocation = groupLocation;
    }

    /**
     * @return the name of the group
     */
    public String getGroupName() {
        return groupName;
    }

    /**
     * @param groupName the name of the group
     */
    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    /**
     * Determines comparison based on groupName.
     * @param o the {@link ScaGroup} to compare to
     * @return the relative order
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    @Override
    public int compareTo(ScaGroup o) {
        return this.groupName.compareTo(o.getGroupName());
    }
}
